function deleteUser()
{ 
    
    $.ajax(
    {
        type : 'DELETE',
        url : '/${project.build.finalName}/restful-services/user-api/delete',
        success : function(data, textStatus, jqXHR)
        {
        	window.location = "/${project.build.finalName}/register.jsp";
        },
        error : function(jqXHR, textStatus, errorThrown)
        {
        	window.location = "/${project.build.finalName}/register.jsp";
        }

    });
}

function deleteMsg(form)
{
    $.ajax(
    {
        type : 'DELETE',
        url : '/${project.build.finalName}/restful-services/user-api/message/delete/' + form.msgId.value,
        success : function(data, textStatus, jqXHR)
        {
        	alert("message deleted");
        },
        error : function(jqXHR, textStatus, errorThrown)
        {
        	alert("can't delete message");
        }

    });
}
